﻿using System;
using System.Web.UI;
using Lib.Controls;
using System.Data;
using Lib.Utilities;
public partial class App_form_Daotao_tkb : fpage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ScriptManager.GetCurrent(this).Services.Add(new ServiceReference("~/Service/wht_nsd.svc"));
            ScriptManager.GetCurrent(this).Services.Add(new ServiceReference("~/Service/wdt_ma.svc"));

            //
            DataTable b_dt = new DataTable();
            LibTable.AddNewColumns(ref b_dt, new string[] { "MA", "TEN" });
            LibTable.AddNewRows(ref b_dt, new object[] { "HKI", "Học kỳ I" });
            LibTable.AddNewRows(ref b_dt, new object[] { "HKII", "Học kỳ II" });
            hocky.DataSource = b_dt;
            hocky.DataBind();

            //NAM
            namhoc.DataSource = dm_dt.FDM_NAM_LKE();
            namhoc.DataBind();

            //GIANG UPNG
            b_dt = dm_dt.FDT_GIANG_DUONG_LKE();
            string json = LibTable.TableToJson(b_dt).ToString();
            //OTHER
            giangduong.Value = json;

            lop.DataSource = dm_dt.FDT_LOP_PC_DAY_LKE(LibConvert.ObjectToDouble(namhoc.SelectedValue));
            lop.DataBind();
        }
    }
}